﻿<%@ Page Language="C#" MasterPageFile="~/Frame.Master" AutoEventWireup="true" CodeBehind="CompanyCarSpecHundredOilUsingRpt.aspx.cs"
    Inherits="Auto.BusMan.Report.CompanyCarSpecHundredOilUsingRpt" Title="同类车型百公里油耗统计" %>

<%@ Register Src="../UserControl/ucDDLKeepDiv.ascx" TagName="ucDDLKeepDiv" TagPrefix="uc1" %>
<%@ Register Assembly="Chartlet" Namespace="FanG" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentMain" runat="server">
    <div class="TitleDivStyle">
        <asp:Label ID="Label1" runat="server" Text="同类车型百公里油耗统计"></asp:Label>
    </div>
    <table border="0" cellspacing="1" cellpadding="0">
        <tr>
            <td>
                <div class="OperateStyle">
                    公司：
                    <uc1:ucDDLKeepDiv ID="ucDDLKeepDiv1" runat="server" />
                    车辆型号:
                    <asp:TextBox ID="txtBusSpec" runat="server"></asp:TextBox>
                    <asp:Button ID="btnSearch" runat="server" Text="查询" OnClick="btnSearch_Click" CssClass="button_bak" /></div>
            </td>
        </tr>
        <tr>
            <td>
                <div>
                    <cc1:Chartlet ID="Chartlet1" runat="server" ChartTitle="同类车型百公里油耗" ChartType="Bar"
                        XUnit="车辆牌号" YUnit="百公里油耗" MaxValueY="100" Height="500px" Width="750px" />
                </div>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnString %>"
                    ProviderName="System.Data.SqlClient" SelectCommand="  SELECT bl.BusIdentificationNO
      --,b.[CompanyName],bl.BusSpec
      ,100*(SUM(b.[OilVolumeByCard])+SUM(b.[OilVolumeByCash]))/MAX(b.[OdometerBus]) AS HundredOilUsing
  --INTO A
  FROM [Bus_BusOilManage] b
  LEFT JOIN Bus_BusList bl ON bl.BusID=b.BusID
  LEFT JOIN Bus_Drivers d ON d.DriverID=b.DriverID
  GROUP BY bl.BusIdentificationNO,b.CompanyName,bl.BusSpec"></asp:SqlDataSource>
            </td>
        </tr>
    </table>
</asp:Content>
